import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
import { Box, Button, Tooltip } from "@mui/material";
import { memo } from "react";

/**
 * 示例按钮组件
 */
const ExampleButton = memo(({ onClick }: { onClick: () => void }) => (
    <Box sx={{ display: 'flex', justifyContent: 'flex-end', mb: 2 }}>
        <Tooltip title="加载示例">
            <Button
                variant="outlined"
                size="small"
                onClick={onClick}
                startIcon={<HelpOutlineIcon />}
            >
                加载示例
            </Button>
        </Tooltip>
    </Box>
));

export default ExampleButton;